<template>
	<view>
		<view class="navBar" :style="`padding-top: ${statusBarHeight}px;`">
			<image src="@/static/arrow-left.png" @click="back"></image>
			{{title}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: uni.getStorageSync("statusBarHeight")
			}
		},
		props: {
			title: {
				default: ''
			}
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	.navBar {
		background: linear-gradient(90deg, rgba(147, 210, 243, 1) 0%, rgba(89, 196, 196, 1) 50%, rgba(22, 164, 167, 1) 100%);
		height: 280rpx;
		text-align: center;
		position: relative;
		font-size: 36rpx;
		display: flex;
		align-items: center;
		justify-content: center;

		image {
			width: 48rpx;
			height: 48rpx;
			position: absolute;
			left: 13rpx;
			top: 50%;
			transform: translateY(-50%);
		}
	}
</style>